package com.jsh.erp.constants;

/**
 * 功能枚举类
 */
public enum FunctionEnum {
    HOME(0, "首页", "Home"),
    RETAIL_OUT(210, "零售出库", "Retail Out"),
    RETAIL_RETURN(211, "零售退货", "Retail Return"),
    RETAIL_MANAGEMENT(225, "零售管理", "Retail Management"),
    PURCHASE_REQUISITION(261, "请购单", "Purchase Requisition"),
    PURCHASE_ORDER(241, "采购订单", "Purchase Order"),
    PURCHASE_IN(33, "采购入库", "Purchase In"),
    PURCHASE_RETURN(199, "采购退货", "Purchase Return"),
    PURCHASE_MANAGEMENT(32, "采购管理", "Purchase Management"),
    SALES_ORDER(242, "销售订单", "Sales Order"),
    SALES_APPROVAL(262, "销售审核", "Sales Approval"),
    INVOICE_ISSUE(41, "仓库出库", "Invoice Issue"),
    SALES_RETURN(200, "销售退货", "Sales Return"),
    SALES_MANAGEMENT(38, "销售管理", "Sales Management"),
    OTHER_IN(201, "其它入库", "Other In"),
    OTHER_OUT(202, "其它出库", "Other Out"),
    TRANSFER_OUT(40, "调拨出库", "Transfer Out"),
    ASSEMBLY(232, "组装单", "Assembly"),
    DISASSEMBLY(233, "拆卸单", "Disassembly"),
    WAREHOUSE_MANAGEMENT(239, "仓库管理", "Warehouse Management"),
    CHEQUE_MANAGEMENT(263, "支票管理", "Cheque Management"),
    INCOME(197, "收入单", "Income"),
    EXPENSE(203, "支出单", "Expense"),
    RECEIPT(204, "收款单", "Receipt"),
    PAYMENT(205, "付款单", "Payment"),
    TRANSFER(206, "转账单", "Transfer"),
    ADVANCE_RECEIPT(212, "收预付款", "Advance Receipt"),
    FINANCIAL_MANAGEMENT(44, "财务管理", "Financial Management"),
    SALES_INCOME_SUMMARY(265, "销售收入汇总", "Sales Income Summary"),
    PRODUCT_INVENTORY(246, "商品库存", "Product Inventory"),
    BANK_ACCOUNT(207, "账户统计", "Bank Account"),
    RETAILS_REPORT(259, "零售统计", "Retails Report"),
    PURCHASE_REPORT(208, "采购统计", "Purchase Report"),
    SALES_REPORT(209, "销售统计", "Sales Report"),
    INVENTORY_IN_DETAIL(226, "入库明细", "Inventory In Detail"),
    INVENTORY_OUT_DETAIL(227, "出库明细", "Inventory Out Detail"),
    INVENTORY_TRANSFER_DETAIL(248, "调拨明细", "Inventory Transfer Detail"),
    INVENTORY_IN_SUMMARY(228, "入库汇总", "Inventory In Summary"),
    INVENTORY_OUT_SUMMARY(229, "出库汇总", "Inventory Out Summary"),
    INVENTORY_REPORT(59, "进销存统计", "Inventory Report"),
    CUSTOMER_LEDGER(235, "客户对账", "Customer Ledger"),
    SUPPLIER_LEDGER(237, "供应商对账", "Supplier Ledger"),
    STOCK_WARNING(244, "库存预警", "Stock Warning"),
    REPORT_QUERY(198, "报表查询", "Report Query"),
    PRODUCT_CATEGORY(22, "商品类别", "Product Category"),
    PRODUCT_INFORMATION(23, "商品信息", "Product Information"),
    UNIT_OF_MEASURE(220, "计量单位", "Unit of Measure"),
    MULTI_ATTRIBUTE(247, "多属性", "Multi-attribute"),
    PRODUCT_MANAGEMENT(21, "商品管理", "Product Management"),
    VENDOR_INFORMATION(25, "供应商信息", "Vendor Information"),
    CUSTOMER_INFORMATION(217, "客户信息", "Customer Information"),
    MEMBER_INFORMATION(218, "会员信息", "Member Information"),
    WAREHOUSE_INFORMATION(26, "仓库信息", "Warehouse Information"),
    INCOME_EXPENSE_ITEMS(194, "收支项目", "Income/Expense Items"),
    BANK_ACCOUNT_INFO(195, "结算账户", "Bank Account"),
    HANDLER_MANAGEMENT(31, "经手人管理", "Handler Management"),
    BASIC_DATA(24, "基本资料", "Basic Data"),
    ROLE_MANAGEMENT(13, "角色管理", "Role Management"),
    USER_MANAGEMENT(14, "用户管理", "User Management"),
    ORGANIZATION_MANAGEMENT(243, "机构管理", "Organization Management"),
    LOG_MANAGEMENT(15, "日志管理", "Log Management"),
    SYSTEM_CONFIGURATION(234, "系统配置", "System Configuration"),
    FUNCTION_MANAGEMENT(16, "功能管理", "Function Management"),
    TENANT_MANAGEMENT(18, "租户管理", "Tenant Management"),
    PRODUCT_ATTRIBUTES(236, "商品属性", "Product Attributes"),
    PLUGIN_MANAGEMENT(245, "插件管理", "Plugin Management"),
    PLATFORM_CONFIGURATION(258, "平台配置", "Platform Configuration"),
    SYSTEM_MANAGEMENT(1, "系统管理", "System Management"),
    CHEQUE_REPORT(266, "支票报表", "Cheque Report"),
    CASH_REPORT(267, "现金报表", "Cash Report"),
    RECEIVABLE(268, "待收货款", "Receivable");

    private final Integer id;
    private final String zhName;
    private final String enName;

    FunctionEnum(Integer id, String zhName, String enName) {
        this.id = id;
        this.zhName = zhName;
        this.enName = enName;
    }

    public Integer getId() {
        return id;
    }

    public String getZhName() {
        return zhName;
    }

    public String getEnName() {
        return enName;
    }

    public static FunctionEnum getById(Integer id) {
        for (FunctionEnum function : values()) {
            if (function.getId().equals(id)) {
                return function;
            }
        }
        return null;
    }
} 